<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\ShopSender
 *
 * @property int $id
 * @property int $shop_id 店铺ID
 * @property string|null $name 发货人姓名
 * @property string|null $phone 电话
 * @property string|null $province 省
 * @property string|null $city 市
 * @property string|null $district 县
 * @property string|null $town 乡镇
 * @property string|null $street 街道
 * @property int $isdefault 是否默认
 * @property mixed $created_at 创建时间
 * @property mixed $updated_at 修改时间
 * @property-read \App\Models\Shop $shop
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereCity($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereDistrict($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereIsdefault($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender wherePhone($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereProvince($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereShopId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereStreet($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereTown($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopSender whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class ShopSender extends Model
{
    protected $table = 'shop_sender';
    protected $primaryKey = 'id';
    protected $fillable = ['shop_id', 'name', 'phone', 'province', 'city', 'district', 'town', 'street', 'isdefault'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function shop()
    {
        return $this->belongsTo(Shop::class, 'shop_id', 'shop_id');
    }
}
